﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jayden.Dll.Web.HtmlControls;
using Jayden.Dll.Sc2.Descriptions;

namespace Jayden.Site.Sc2.Dll
{
	public class EntityUl : Ul
	{
		public Li AddLi(EntityDescription e)
		{
			ServerRender = true;
			Li li = AddLi();
			A a = li.AddA(null, "?entityId=" + e.Id);
			a.AddImg(e.Id, "/Images/" + e.IconId + ".gif").Title = e.Name;
			return li;
		}

		public void Set(IEnumerable<EntityDescription> list)
		{
			Clear();
			foreach (EntityDescription e in list)
				AddLi(e);
		}
	}
}
